function go2Page(url) {
	if (url == 'login' || url == 'register') {
		switch (url) {
			case 'login':
				redict2Page('/pages/login/login')
				break
			case 'register':
				jump2Page('/pages/register/register')
				break
		}
		return
	}
	if (!this.$store.getters.getLogin) {
		redict2Page('/pages/login/login')
		return
	}
	if (url == 'sport') {
		switch2Page('/pages/sport/sport')
		return
	}
	switch (url) {
		case 'editPersonInfo':
			jump2Page('/pages/mine/editPersonInfo/editPersonInfo')
			break;
		case 'index':
			switch2Page('/pages/index/index')
			break;
		case 'training':
			jump2Page('/pages/sport/training/training')
			break
		case 'commonSport':
			jump2Page('/pages/index/common/common')
			break
		case 'course':
			jump2Page('/pages/index/course/course')
			break
		case 'sportKG':
			jump2Page('/pages/index/kg/kg')
			break
		case 'editPassword':
			jump2Page('/pages/mine/editPassword/editPassword')
			break
		case 'healthRecord':
			jump2Page('/pages/sport/healthRecord/healthRecord')
			break
		case 'trainRecord':
			jump2Page('/pages/sport/trainRecord/trainRecord')
			break
		case 'editDynamic':
			jump2Page('/pages/community/dynamicEdit/dynamicEdit')
			break
		case 'manageDynamic':
			jump2Page('/pages/community/dynamicManage/dynamicManage')
			break
		case 'courseCollect':
			jump2Page('/pages/mine/courseCollect/courseCollect')
			break
		case 'traindDetail':
			jump2Page('/pages/sport/traindDetail/traindDetail')
	}
}

function jump2Page(url) {
	setTimeout(() => {
		uni.navigateTo({
			url: url
		}, 0.2 * 1000)
	})
}

function redict2Page(url) {
	setTimeout(() => {
		uni.redirectTo({
			url: url
		}, 0.5 * 1000)
	})
}

function switch2Page(url) {
	setTimeout(() => {
		uni.switchTab({
			url: url
		}, 0.5 * 1000)
	})
}
export default go2Page